
import React from 'react';

class AuthComponent extends React.Component {
    constructor(props) {
        super(props);
        this.checkLogin();
    }
    checkLogin() {
        if(!sessionStorage.getItem('user') && !localStorage.getItem('user')) {
            this.props.history.push('/login');
        }
    }
}

export default AuthComponent;